/* 卡片式模块基础样式 */
.frame-sub-3 {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.module-header {
    margin-bottom: 20px;
}

.module-header h3 {
    color: #081615;
    font-size: 18px;
    font-weight: 400;
    font-family: "SourceHanSansCN-Regular";
}

.module-title {
    font-size: 14px;
    color: #5f6868;
    margin-bottom: 10px;
}

/* 上方行布局 */
.monitor-top-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    height: 15%;
}

.sleep-time-module, .eeg-status-module {
    width: 48%;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.time-display {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-top: 15px;
}

.status-display {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.connected {
    background-color: #43CF7C;
}

.status-indicator.disconnected {
    background-color: #ff4b4b;
}

.status-text {
    font-size: 16px;
    color: #333;
}

/* 控制按钮样式 */
.control-buttons {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    height: 10%;
}

.control-btn {
    background: #8146ff;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s;
}

.control-btn:hover {
    opacity: 0.9;
}

.control-btn:active {
    transform: translateY(1px);
}

.control-btn:disabled {
    background: #b5a1e0;
    cursor: not-allowed;
}

/* 脑电图样式 */
.eeg-graph-module {
    height: 60%;
    display: flex;
    flex-direction: column;
}

.graph-container {
    display: flex;
    flex: 1;
    position: relative;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
}

.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50px;
}

.y-label {
    font-size: 11px;
    color: #666;
}

#eeg-graph {
    flex: 1;
    height: 100%;
    min-height: 200px;
}

/* 主容器样式 */
.main-container {
    display: flex;
    max-width: 1920px;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    background-color: #f6f6f6;
}

/* 内容区域样式 */
.content-area {
    position: relative;
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    padding-top: 90px;
    background: #f6f6f6;
    max-width: calc(100% - 260px);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 内容容器 */
.content-container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 模块行样式 */
.top-modules, .bottom-modules {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 基础模块样式 */
.eeg-display-module, .connection-module, 
.monitoring-module, .upload-module {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    min-width: 250px;
}

/* 模块宽度比例调整 */
.eeg-display-module {
    flex: 3 1 400px;
}

.connection-module {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px;
    min-height: 250px;
}

.connection-module .module-header {
    margin-bottom: 20px;
    width: 100%;
}

.connection-module .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F5F5F5;
    padding: 5px 10px;
    border-radius: 4px;
    width: fit-content;
}

.connection-icon {
    background-image: url(https://img.js.design/assets/element/js_L4SW7Z8C9Kb/image/d0d30903c74e9ffc8723124399a7a291f00a06c8.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 180px;
    width: 180px;
    margin: auto;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: #43CF7C;
}

.monitoring-module {
    flex: 3 1 400px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.upload-module {
    flex: 1 1 250px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    align-items: center;
}

.upload-module .module-header {
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
}

.upload-module .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F5F5F5;
    padding: 5px 10px;
    border-radius: 4px;
    width: fit-content;
    margin: 0 auto;
}

/* 图片容器样式 */
.eeg-image {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    overflow: hidden;
}

/* 限制图片大小 */
.eeg-image img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

/* 模块标题样式 */
.module-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.module-header h3 {
    color: #081615;
    font-size: 16px;
    font-weight: 500;
    font-family: "SourceHanSansCN-Regular";
    margin: 0;
}

/* 通道信息样式 */
.channel-info {
    font-size: 12px;
    color: #737b7b;
}

/* 视图选项样式 */
.view-options {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.view-option {
    font-size: 12px;
    color: #737b7b;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.view-option.active {
    background-color: #f5fbf5;
    color: #56c456;
}

/* 上传表单样式 */
.upload-form {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.upload-icon {
    display: block;
    width: 320px;
    height: 320px;
    background-image: url(/static/assets/images/upload.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    margin: 0 auto;
}

.file-name {
    margin: 0;
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-btn {
    background: #8146ff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 auto;
    width: 120px;
    display: block;
}

/* 监测模块顶部行 */
.monitor-top-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.sleep-time-module, .eeg-status-module {
    flex: 1 1 150px;
    min-width: 150px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.submodule-title {
    font-size: 13px;
    color: #5f6868;
    margin-bottom: 8px;
    font-weight: normal;
}

.time-display {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* 状态显示样式 */
.status-display {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.status-indicator.connected {
    background-color: #43CF7C;
}

.status-indicator.disconnected {
    background-color: #ff4b4b;
}

.status-text {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

/* 控制按钮组 */
.control-buttons {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.control-btn {
    flex: 1;
    min-width: 90px;
    background: #8146ff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.control-btn:hover {
    background: #7035e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.control-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.control-btn:disabled {
    background: #b5a1e0;
    cursor: not-allowed;
}

/* 响应式布局增强 */
@media screen and (max-width: 1400px) {
    .content-container {
        padding: 15px;
    }
    
    .top-modules, .bottom-modules {
        gap: 15px;
    }
    
    .eeg-display-module, .connection-module, 
    .monitoring-module, .upload-module {
        padding: 15px;
    }
}

@media screen and (max-width: 1280px) {
    .top-modules, .bottom-modules {
        flex-direction: column;
    }
    
    .eeg-display-module, .connection-module, 
    .monitoring-module, .upload-module {
        width: 100%;
        flex: none;
        min-height: 200px;
    }
    
    .connection-module {
        min-height: 250px;
    }
    
    .eeg-image img {
        max-height: 200px;
    }
}

@media screen and (max-width: 768px) {
    .content-area {
        margin-left: 0;
        max-width: 100%;
        padding-top: 60px;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .view-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .monitor-top-row {
        flex-direction: column;
    }
    
    .sleep-time-module, .eeg-status-module {
        width: 100%;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .control-btn {
        width: 100%;
        margin-bottom: 10px;
    }
} 